package com.bafa.front.admin;

import com.bafa.dbcache.LeagueCache;
import com.bafa.exceptions.ErrorException;
import com.bafa.objects.Message;
import com.bafa.objects.PageBean;
import com.bafa.services.RetrieveServices;
import com.bafa.services.SeasonServices;

import java.io.IOException;

import java.util.HashMap;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public class AddAdminTeamToSeasonServlet extends AdminServlet {

    @Override
    public void doAdminEvent(HttpServletRequest request, 
                             HttpServletResponse response) throws ServletException, 
                                                                  IOException, ErrorException {
        SeasonServices.addTeamToSeason(new Integer(request.getParameter("SeasonId")).intValue(),new Integer(request.getParameter("Division")).intValue(),new Integer(request.getParameter("TeamId")).intValue());
        message = new Message();
        message.addMessage("Team added to season");
       url="logon.bafa";
    }
}
